{include file="lib/header.html" type="set_newpass" title="设置新密码" }
  <div id="container">
    <div class="look-for-pwd">
      <div class="top">
        <ul class="clearfix">
          <li class="actived"><a href="javascript:void(0);"><span class="num">1</span>填写用户名<i class="arrow"></i></a></li>
          <li class="actived"><a href="javascript:void(0);"><span class="num">2</span>验证身份<i class="arrow"></i></a></li>
          <li class="curr"><a href="javascript:void(0);"><span class="num">3</span>设置新密码<i class="arrow"></i></a></li>
          <li><a href="javascript:void(0);"><span class="num">4</span>完成</a></li>
        </ul>
      </div>
      <div class="steps">
        <div class="step4">
          <h2 class="tit">请重设您的帐号密码</h2>
          <div class="input-box">
          <form action="{AnUrl('user/getback/get_success')}" method="post" id="js_submitBtn">
            <p class="clearfix"><span class="name">新密码：</span><span class="txt-wrap clearfix"><input type="password" name="password" id="js_password" class="txt txt1"/></span><span class="span1 prompt-red" id="passError"></span></p>
            <p class="clearfix"><span class="name">确认密码：</span><span class="txt-wrap clearfix"><input type="password" name="repassword" id="js_repassword" class="txt txt2"/></span><span class="span1 prompt-red" id="repassError"></span></p>
            <div class="btn-box"><a href="javascript:void(0);" class="btn1 submit-btn">提交</a></div>
          </form>
          </div>
        </div>
      </div>
      <!--end steps-->
    </div>
  </div>
</div>
<script>
$(function(){
  $('.prompt').click(function(){
    $(this).hide();
  });
  $('.submit-btn').click(function(){
    var pass = $.trim($('#js_password').val());
    var repass = $.trim($('#js_repassword').val());
    if(pass == '') {
      $('#passError').html('对不起，新密码不得为空');
      return ;
    }
    if(repass == '') {
      $('#repassError').html('对不起，确认密码不得为空');
      return ;
    }
    if(getStringLen(pass) < 6) {
      $('#passError').html('对不起，密码最少要6位字符');
      return ;
    }
    if(getStringLen(pass) >= 20) {
      $('#passError').html('对不起，密码最多要20位字符');
      return ;
    }
    if(pass != repass) {
      $('#repassError').html('对不起，两次输入密码不一致');
      return ;
    }
    $.post(
        "{AnUrl('user/getback/get_success')}",
        { 'password':pass, 'repassword':repass },
        function(data){ 
          if(data.info == 'error') {
            $('#passError').html(data.msg);
            return;
          } else {
            $('#js_submitBtn').submit();        
          }
        },'json'
      );
  });
})
</script>
{include file="lib/footer.html"}